/*
 * Powered By [pkuWx]
 * Web Site: http://www.wuxi.ss.pku.edu.cn
 * Since 2015 - 2015
 */

package cn.edu.pku.wxlib.category.model;

import javax.validation.constraints.*;
import org.hibernate.validator.constraints.*;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import cn.org.rapid_framework.util.DateConvertUtils;

import java.util.*;

import cn.edu.pku.wxlib.category.model.*;
import cn.edu.pku.wxlib.category.service.*;
import cn.edu.pku.wxlib.category.vo.query.*;

import javacommon.base.*;
import javacommon.util.*;
import javacommon.page.Page;

/**
 * @version 1.0
 * @since 1.0
 */


public class Category extends BaseEntity implements java.io.Serializable{
	private static final long serialVersionUID = 5454155825314635342L;
	
	//alias
	public static final String TABLE_ALIAS = "Category";
	public static final String ALIAS_CATEGORY_ID = "categoryId";
	public static final String ALIAS_PARENT_CATEGORY_ID = "父类型ID";
	public static final String ALIAS_CATEGORY_NAME = "categoryName";
	public static final String ALIAS_REMARK = "备注";
	public static final String ALIAS_STATE = "1启用，0禁用";
	
	//date formats
	
	//columns START
    /** categoryId       db_column: categoryId */	
	
	private java.lang.Integer categoryId;
    /** 父类型ID       db_column: parentCategoryId */	
	
	private java.lang.Integer parentCategoryId;
    /** categoryName       db_column: categoryName */	
	@NotBlank @Length(max=32)
	private java.lang.String categoryName;
    /** 备注       db_column: remark */	
	@Length(max=128)
	private java.lang.String remark;
    /** 1启用，0禁用       db_column: state */	
	
	private java.lang.Integer state;
	//columns END

	public Category(){
	}

	public Category(
		java.lang.Integer categoryId
	){
		this.categoryId = categoryId;
	}

	public void setCategoryId(java.lang.Integer value) {
		this.categoryId = value;
	}
	
	public java.lang.Integer getCategoryId() {
		return this.categoryId;
	}
	public void setParentCategoryId(java.lang.Integer value) {
		this.parentCategoryId = value;
	}
	
	public java.lang.Integer getParentCategoryId() {
		return this.parentCategoryId;
	}
	public void setCategoryName(java.lang.String value) {
		this.categoryName = value;
	}
	
	public java.lang.String getCategoryName() {
		return this.categoryName;
	}
	public void setRemark(java.lang.String value) {
		this.remark = value;
	}
	
	public java.lang.String getRemark() {
		return this.remark;
	}
	public void setState(java.lang.Integer value) {
		this.state = value;
	}
	
	public java.lang.Integer getState() {
		return this.state;
	}

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("CategoryId",getCategoryId())
			.append("ParentCategoryId",getParentCategoryId())
			.append("CategoryName",getCategoryName())
			.append("Remark",getRemark())
			.append("State",getState())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getCategoryId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof Category == false) return false;
		if(this == obj) return true;
		Category other = (Category)obj;
		return new EqualsBuilder()
			.append(getCategoryId(),other.getCategoryId())
			.isEquals();
	}
}

